package com.evil.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 数据库实体特殊字段
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@AllArgsConstructor
public enum SpecialFieldEnum {

    IS_DELETED("isDeleted"),
    CREATOR_ID("creatorId"),
    CREATOR_NAME("creatorName"),
    MODIFIER_ID("modifierId"),
    MODIFIER_NAME("modifierName"),
    CREATED("created"),
    UPDATED("updated"),
    ;

    @Getter
    private final String name;

    public static String[] getSpecialFields() {
        return Arrays.stream(values()).map(e -> e.name).toArray(String[]::new);
    }
}
